package com.psp.bu.persist.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Repository;

import com.psp.bu.model.AddressBean;
import com.psp.bu.persist.dao.AddressDao;

@Repository
public class AddressImpl extends BaseImpl implements AddressDao {
	protected static final String NAME_SPACE = NAME_SPACE_HEADER + ".AddressMapper";

	@Override
	public AddressBean selectById(String aid) {
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectById", aid);
	}

	@Override
	public List<AddressBean> selectByIds(Set<String> aids) {
		Map<String, Object> where = new HashMap<String, Object>();
		where.put("aids", aids);
		return sqlSessionTemplate.selectList(NAME_SPACE + ".selectByIds", where);
	}

}
